package com.dubbo.mapper;

import com.dubbo.pojo.Product;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductMapper {

    @Insert("insert into product values(null,#{title},#{group1},#{group2},#{group3},#{price},#{sellpoint},#{imagepath},0)")
    public int addProduct(Product product);

    @Select("select * from product ")
    public List<Product> showList();

    @Select("select * from product where pid = #{param1}")
    public Product showOne(int id);

}
